#!/bin/bash

if [ `whoami` != "root" ]; then
    echo "需要以root用户执行"
    exit -1;
fi

INSTALL_DIR=/usr/local/boot

systemctl stop boot.service
systemctl disable boot.service

DEFAULT_SYSTEMD_DIR="/usr/lib/systemd/system/"
if [ -d $DEFAULT_SYSTEMD_DIR ]; then
	SYSTEMD_DIR=$DEFAULT_SYSTEMD_DIR
else
	SYSTEMD_DIR="/lib/systemd/system/"
fi
rm -rf ${SYSTEMD_DIR}/boot.service

rm -rf $INSTALL_DIR

echo "卸载完成"

